package com.demo.gateway.sentinel.config;

import com.demo.gateway.sentinel.factory.FlowControl;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;


@Data
@Configuration
@RefreshScope
public class DynamicConfig {
    /**
     * 限流器，多个用”,“隔开
     * 限流器定义： {@link com.demo.gateway.sentinel.factory.FlowControl#getName()}
     */
    @Value("${fc.name:none}")
    public String fcName;

    /**
     * 限流器，多个用”,“隔开
     * 限流器定义： {@link com.demo.gateway.sentinel.factory.FlowControl#getName()}
     */
    @Value("${fc.rate.timecount:5}")
    public int fcRateTimeCount;
}
